import './Index.scss';
import '../style/iconfont.css'
import { Route, Redirect, Switch } from "react-router-dom";
import Home from '../view/Index/Home'
import Cate from '../view/Index/Cate'
import Allgoods from '../view/Index/Allgoods'
import Shopcarts from '../view/Index/Shopcarts'
import Mine from '../view/Index/Mine'
import NotFound from './NotFound';
import Tabbar from '../components/Index/Tabbar';

function App() {
    return (
        <>
            <div className='index'>
                <Switch>
                    <Route path='/index/home' component={Home} />
                    <Route exact path='/index/cate' component={Cate} />
                    <Route exact path='/index/allgoods' component={Allgoods} />
                    <Route exact path='/index/shopcarts' component={Shopcarts} />
                    <Route exact path='/index/mine' component={Mine} />
                    <Redirect exact from='/index/' to='/index/home' />
                    <Route path='*' component={NotFound} />
                </Switch>
            </div>
            <Tabbar />
        </>
    );
}

export default App;
